package com.nuanshui.framework.utils;

/**
 * Created by zxh on 2016/11/21.
 */
public class UserAuthUtil {

    public static long addAuth(long auth,int authIndex)
    {
        return FlagOperationFactory.getPosOp().addFlag(auth,authIndex);
    }

    public static long delAuth(long auth,int authIndex)
    {
        return FlagOperationFactory.getPosOp().removeFlag(auth,authIndex);
    }

    public static boolean hasAuth(Long auth,int authIndex) {

        if(auth==null) return false;
        return FlagOperationFactory.getPosOp().containFlag(auth,authIndex);
    }
}
